Function.prototype.myCall = function (context, ...args) {
  context.fn = this
  const result = context.fn(...args)
  delete context.fn
  return result
}
Function.prototype.myApply = function (context, args) {
  context.fn = this
  const result = context.fn(...args)
  delete context.fn
  return result
}
Function.prototype.myBind = function (context, args) {
  return function (...newArgs) {
    context.fn = this
    return context.fn(...args, ...newArgs)
  }
}

// 使用示例
function greet(message) {
  console.log(`${message}, ${this.name}`)
}
const person = { name: 'Alice' }
greet.myCall(person, 'Hello') // 输出: Hello, Alice
